<?php

	class ReturnDataVO{
		
		public $success		= FALSE;
		public $result 		= NULL;
		public $code_return	= NULL;
		public $count_total = NULL;
		
		public function __construct($success = FALSE, $resource = NULL, $code_result = NULL){
			$this->success = $success;
			$this->result = $this->fetchArrayPush($resource);
			$this->code_result = $code_result;
			$this->count_total = count($this->result);
		}
		
		function fetchArrayPush($result){
			$resultArray = array();
			while($tempArray = $this->fetch_array($result)){
				array_push($resultArray, $tempArray);
			}
			return $resultArray;
		}
		
		function fetch_array($result){
			return mysql_fetch_array($result);
		}
		
		public function fetch_object($result){
			return mysql_fetch_object($result);
		}
		
	}
?>